<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@include file="/context/mytags.jsp"%>
<t:base type="jquery,easyui,tools,DatePicker"></t:base>
<div class="easyui-layout" fit="true">
  <div region="center" style="padding:0px;border:0px">
  <t:datagrid name="tmblWorkPlaceList" singleSelect="true" checkbox="true" sortName="code" sortOrder="desc"  pagination="false" fitColumns="false"  title="服务点列表" actionUrl="tmblWorkPlaceController.do?departgrid" treegrid="true"   idField="id" fit="true" >
   <t:dgCol title="id"  field="id"  hidden="true"   width="10" treefield="id"></t:dgCol>
   <t:dgCol title="名称"  field="workplace"   width="150" treefield="text"></t:dgCol>
   <t:dgCol title="序号"  field="code"  width="100"  treefield="src"></t:dgCol>
   <t:dgCol title="地址"  field="address"     width="300" treefield="fieldMap.address"></t:dgCol>
   <t:dgCol title="服务电话"  field="telephone"      width="120" treefield="fieldMap.telephone"></t:dgCol>
    <t:dgCol title="运营状况"  field="isWork" replace="在运营_1,不在运营_0"     width="120" treefield="fieldMap.isWork"></t:dgCol>
   <%-- <t:dgCol title="操作" field="opt" width="100"></t:dgCol> --%>
   <%-- <t:dgDelOpt title="删除" url="tmblWorkPlaceController.do?doDel&id={id}" /> --%>
   <t:dgToolBar title="录入地区" icon="icon-add" url="tmblWorkPlaceController.do?goArea" funname="add"></t:dgToolBar>
   <t:dgToolBar title="录入服务点" icon="icon-add"  funname="addPlace()" ></t:dgToolBar>
   <t:dgToolBar title="编辑服务点" icon="icon-edit"  funname="updatePlace()" ></t:dgToolBar>
  <%--  <t:dgToolBar title="批量删除"  icon="icon-remove" url="tmblWorkPlaceController.do?doBatchDel" funname="deleteALLSelect"></t:dgToolBar>
   <t:dgToolBar title="查看" icon="icon-search" url="tmblWorkPlaceController.do?goUpdate" funname="detail"></t:dgToolBar>
   <t:dgToolBar title="导入" icon="icon-put" funname="ImportXls"></t:dgToolBar>
   <t:dgToolBar title="导出" icon="icon-putout" funname="ExportXls"></t:dgToolBar>
   <t:dgToolBar title="模板下载" icon="icon-putout" funname="ExportXlsByT"></t:dgToolBar> --%>
  </t:datagrid>
  </div>
 </div>
	
 <script type="text/javascript">
 function addPlace() {
     var id = "";
     var rowsData = $('#tmblWorkPlaceList').datagrid('getSelections');
     if (rowsData.length == 1) {
         id = rowsData[0].id;
     }
     var url = "tmblWorkPlaceController.do?goAdd&id=" + id;
     add('<t:mutiLang langKey="录入服务点" />', url, "tmblWorkPlaceList");
 }
 function updatePlace(){
	 var id = "";
     var rowsData = $('#tmblWorkPlaceList').datagrid('getSelections');
     
    if (!rowsData || rowsData.length==0) {
			tip('请选择编辑项目');
			return;
	}else if (rowsData.length == 1) {
        id = rowsData[0].id;
        var url = "tmblWorkPlaceController.do?goUpdate&id=" + id;
        add('<t:mutiLang langKey="编辑服务点" />', url, "tmblWorkPlaceList");
    }
     
 }
   
 
/* //导入
function ImportXls() {
	openuploadwin('Excel导入', 'tmblWorkPlaceController.do?upload', "tmblWorkPlaceList");
}

//导出
function ExportXls() {
	JeecgExcelExport("tmblWorkPlaceController.do?exportXls","tmblWorkPlaceList");
}

//模板下载
function ExportXlsByT() {
	JeecgExcelExport("tmblWorkPlaceController.do?exportXlsByT","tmblWorkPlaceList");
} */
 </script>